﻿using System.Web.Mvc;

namespace Jzy.UI.Web.Areas.Forum
{
    public class ForumAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Forum";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Forum_Topic_List",
                "Forum/Topic/List/{boardID}",
                new { controller = "Topic", action = "List"}
            );

            context.MapRoute(
                "Forum_Topic_Detail",
                "Forum/Topic/Detail/{topicID}/{currentPage}",
                new { controller = "Topic", action = "Detail", currentPage = UrlParameter.Optional }
            );

            context.MapRoute(
                "Forum_default",
                "Forum/{controller}/{action}/{id}",
                new { controller="Home", action = "Index", id = UrlParameter.Optional }
            );

            
        }
    }
}
